#ifndef _SYSTEMTIMER_H
#define _SYSTEMTIMER_H
#ifdef __cplusplus
 extern "C" {
#endif
#include "stm32f4xx.h"

#define StartCheck 1
#define StopCheck  0

typedef struct{
	uint32_t last_time;
	float dt;
}TimeStamp;
	 
//#define micros() TIM5->CNT	  //读取系统时钟
#define micros() Get_SysterTime()
	 
void Initial_System_Timer(void);
void Initial_TIM1(u16 arr,u16 psc);
int32_t Get_SysterTime(void);
unsigned char UpdataTimeStamp(TimeStamp *_ptemp);
void RunTime(unsigned char flag);
void delay_ms_nos(uint32_t cnt);
void delay_us_nos(uint32_t cnt);
#ifdef __cplusplus
 }
#endif
#endif
